<include file="public:top" />
<!--网站设置-->
<body class="body">
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="">
    <input type="hidden" name="menuid"  value="{$menuid}"/>
    <div class="layui-form-item">
        <label class="layui-form-label">{:L('site_name')}</label>
        <div class="layui-input-block">
            <input type="text" name="setting[site_name]" placeholder="请输入网站名称" class="layui-input" value="{:C('wkcms_site_name')}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站链接</label>
        <div class="layui-input-inline">
            <input type="text" name="setting[site_url]" placeholder="请输入网站链接" class="layui-input" value="{:C('wkcms_site_url')}">
        </div>
        <div class="layui-form-mid layui-word-aux">输入完整链接，必须加上http:// 并以 “<span style="color: #FF5722"> / </span>”结尾。  <span style="color: #FF5722">否则会导致图片不显示等问题</span></div>
    </div>
   
    <div class="layui-form-item">
        <label class="layui-form-label">网站备案</label>
        <div class="layui-input-block">
            <input type="text" name="setting[site_icp]" placeholder="请输入备案号" class="layui-input" value="{:C('wkcms_site_icp')}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">{:L('score_name')}</label>
        <div class="layui-input-block">
            <input type="text" name="setting[score_name]" placeholder="请输入积分名称" class="layui-input" value="{:C('wkcms_score_name')}">
        </div>
    </div>
    <div class="layui-form-item" pane="">
        <label class="layui-form-label">允许充值</label>
        <div class="layui-input-block">
       <input type="radio" title="允许" <if condition="C('wkcms_score_pay.isscore') eq '1'">checked="checked"</if> value="1" name="setting[score_pay][isscore]">
       <input type="radio" title="不允许" <if condition="C('wkcms_score_pay.isscore') eq '0'">checked="checked"</if> value="0" name="setting[score_pay][isscore]">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">充值比例</label>
        <div class="layui-input-inline">
 <input type="number" name="setting[score_pay][getscore]" lay-verify="required" placeholder="请输入充值比例" class="layui-input" value="{:C('wkcms_score_pay.getscore')}">
        </div>
        <div class="layui-form-mid layui-word-aux">例如：填写10则为1元人民币兑换10个积分</div>
    </div>
 
    <div class="layui-form-item">
        <label class="layui-form-label">广告时间</label>
        <div class="layui-input-inline">
        <input type="number" name="setting[score_pay][adtime]" lay-verify="required" placeholder="请输入广告时间" class="layui-input" value="{:C('wkcms_score_pay.adtime')}">
        </div>
        <div class="layui-form-mid layui-word-aux">文档预览时的广告显示时间，单位为：秒！</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">客服QQ</label>
        <div class="layui-input-inline">
        <input type="text" name="setting[site_qq]" placeholder="请输入联系人QQ" class="layui-input" value="{:C('wkcms_site_qq')}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">客服电话</label>
        <div class="layui-input-inline">
        <input type="text" name="setting[site_tel]" placeholder="请输入联系人QQ" class="layui-input" value="{:C('wkcms_site_tel')}">
        </div>
    </div>

   
    <div class="layui-form-item">
        <label class="layui-form-label">{:L('statistics_code')}</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入网站统计代码" name="setting[statistics_code]" class="layui-textarea">{:C('wkcms_statistics_code')}</textarea>
        </div>
    </div>
    <div class="layui-form-item" pane="">
        <label class="layui-form-label">{:L('site_status')}</label>
        <div class="layui-input-block">
       <input type="radio" title="{:L('open')}" <if condition="C('wkcms_site_status') eq '1'">checked="checked"</if> value="1" name="setting[site_status]">
       <input type="radio" title="{:L('close')}" <if condition="C('wkcms_site_status') eq '0'">checked="checked"</if> value="0" name="setting[site_status]">
        </div>
    </div>
    <div <if condition="C('wkcms_site_status') eq 1">class="layui-hide"</else>class="layui-form-item"</if>>
        <label class="layui-form-label">{:L('closed_reason')}</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入网站关闭原因" name="setting[closed_reason]" id="closed_reason" class="layui-textarea">{:C('wkcms_closed_reason')}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class=""></label>
        <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="upbtn">提交保存</button>
        </div>
    </div>
</form>

<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
//Demo
layui.use(['layer','jquery','form'], function () {
   // 操作对象
    var layer = layui.layer,$ = layui.jquery,form = layui.form;
  
  // 提交
    form.on('submit(upbtn)', function (data) {
        // 提交到方法 默认为本身
        $.post("{:u('global/edit')}",data.field,function(res){
            if(res.status.status ==  1){
                layer.msg(res.status.info,{time:1800},function(){
                  location.href = "{:u('global/index')}&menuid={$menuid}";
                });
            }else{
                layer.msg(res.status.info,{time:1800});
                // $('.verify_img').click();
            }
        });
        return false;
    });
});
</script>
</body>
</html>